<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
		<script src="http://cdn.jsdelivr.net/vue/1.0.16/vue.js" type="text/javascript" charset="utf-8"></script>
	</head>
	<body>
		<div id="app">
			<ul>  <!--循环products这个数据对象里的每一个ele对象”。-->
				<li v-for="ele in products"><!--{{$index}} vue2.0不支持-->
					{{$index}}-{{ele.name}}-￥{{ele.price}}-{{ele.category}}
				</li>
			</ul>	
		</div>
		<script type="text/javascript">
			var vm = new Vue({
				el:'#app',
				data:{
				products:[
				{name:'yihui',price:'100',category:'xh'},
				{name:'erxiao',price:'100',category:'bxh'}
				]
				}
			});
		</script>
	</body>
</html>
